<?php /* Smarty version 2.6.18, created on 2017-01-03 16:53:52
         compiled from user/user.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
                <div class="box-header with-border">
                    <span class="fa fa-user-plus" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>

                    <a href="index.php?a=user.list&type=staff" class="btn <?php if ($this->_tpl_vars['type'] == 'staff'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?> btn-sm">教师列表</a>
                    <a href="index.php?a=user.list&type=student" class="btn <?php if ($this->_tpl_vars['type'] == 'student'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?> btn-sm">学生列表</a>
                    <a href="index.php?a=user.list&type=repair" class="btn <?php if ($this->_tpl_vars['type'] == 'repair'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?> btn-sm">外部业务人员</a>
					<a href="index.php?a=user.list&type=admin" class="btn <?php if ($this->_tpl_vars['type'] == 'admin'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?> btn-sm">超级管理员</a>
                    <a href="index.php?a=user.add" class="btn btn-success btn-sm" style="float:right; color:#fff;">添加用户</a>
                </div>
                   <div class="box-body">
                     <form action="" method="get">
                        <div class="col-sm-3 form-group">
                              <label class="col-sm-5 control-label text-right" >
                                   用户名：
                              </label>
                              <div class="input-group col-md-7 col-xs-12">
                                   <input type="text" class="form-control" value=""  name="name">
                              </div>
                            </div>
                         <div class="col-sm-3 form-group">
                            <label class="col-sm-5 control-label text-right" >
                                姓名：
                            </label>
                            <div class="input-group col-sm-7 col-xs-12" >
                                <input type="text" class="form-control" value=""  name="true_name">
                            </div>
                         </div>
						 <?php if ($this->_tpl_vars['type'] == 'student'): ?>
                         <div class="col-sm-4 form-group">
                            <label class="col-sm-4 control-label text-right">
                                班级
                            </label>
                            <div class="input-group col-sm-5 col-xs-12" style="float:left; margin-right:8px;">
                                <select class="form-control" id="class_id" name="class_id">
                                    <option value="">-请选择-</option>
                                    <?php $_from = $this->_tpl_vars['classes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <option value="<?php echo $this->_tpl_vars['value']['class_id']; ?>
"><?php echo $this->_tpl_vars['value']['class_name']; ?>
</option>
                                    <?php endforeach; endif; unset($_from); ?>
                                </select>
                                </div>				  
                        </div>
						<?php endif; ?>
						<input type="hidden" name="a" value="user.list">
					    <input type="hidden" name="type" value="<?php echo $this->_tpl_vars['type']; ?>
">
					    <button type="submit" class="btn btn-warning">查 询</button>
                    </form>
					<div style="clear:both;"></div>
					<?php if ($this->_tpl_vars['type'] == 'student'): ?>
                    <a href="index.php?a=user.status&status=0" class="btn btn-default btn-sm">停用所有学生帐号</a>
                    <a href="index.php?a=user.status&status=1" class="btn btn-default btn-sm">启用所有学生帐号</a><?php endif; ?>
                        <table class="table table-bordered"  id="mytable">
                                <thead>
                                    <tr>
                                        <td>id</td>
                                        <td>用户名</td>
										<?php if ($this->_tpl_vars['type'] == 'student'): ?>
                                        <td>班级</td>
										<?php endif; ?>
                                        <td>姓名</td>
										<td>用户类型</td>
										<td>用户组</td>
										<td>添加时间</td>
										<td>最后一次修改</td>
										<td>操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								<?php $_from = $this->_tpl_vars['user_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>
                                        <td><?php echo $this->_tpl_vars['value']['user_id']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['user_name']; ?>
</td>
										<?php if ($this->_tpl_vars['type'] == 'student'): ?>
                                        <td><?php echo $this->_tpl_vars['value']['class']; ?>
</td>
										<?php endif; ?>
                                        <td><?php echo $this->_tpl_vars['value']['true_name']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['type_note']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['user_group']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['create_time']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['update_time']; ?>
</td>
										<td>
										<a href="index.php?a=user.pms&user_id=<?php echo $this->_tpl_vars['value']['user_id']; ?>
">权限</a>
										<a href="index.php?a=user.update&user_id=<?php echo $this->_tpl_vars['value']['user_id']; ?>
">修改</a>
										<?php if ($this->_tpl_vars['value']['status'] == '1'): ?>
										<a href="index.php?a=user.freeze&user_id=<?php echo $this->_tpl_vars['value']['user_id']; ?>
" onclick="if(confirm('警告！确认冻结?')==false)return false;">冻结</a>											
										<?php else: ?>
										<a href="index.php?a=user.unfreeze&user_id=<?php echo $this->_tpl_vars['value']['user_id']; ?>
" >解冻</a>	
										<?php endif; ?>
										<?php if ($this->_tpl_vars['value']['user_type'] != 'admin'): ?>
										<a href="index.php?a=user.infoupdate2&user_id=<?php echo $this->_tpl_vars['value']['user_id']; ?>
">档案</a>
										<?php endif; ?>
										</td>
                                    </tr>	
								<?php endforeach; endif; unset($_from); ?>
                                </tbody>	
                        </table>

								<?php echo $this->_tpl_vars['page']; ?>

				   </div><!--box-body -->
           </div><!--box box-default box-solid-->
        </section>    
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
